//
//  ThirdPartLoginViewController.h
//  Growth
//
//  Created by Hobo.Chen on 4/13/12.
//  Copyright (c) 2012 MEETStudio. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ContentUnitViewController.h"
#import "PushRightViewController.h"
#import "WebRequest.h"
#import "WebConnection.h"
#import "WebConnetionArray.h"

#import "ThirdPartNickNameView.h"

@protocol ThirdPartViewControllerDelegate;

@interface ThirdPartLoginViewController : PushRightViewController<UITextFieldDelegate>{
    
    UILabel *nicknameLabel;
    UITextField *emailTextField;
    UITextField *keyTextField;
    
    NSDictionary *userInfo_dict;
    
   UITextField *nicknameTextField;
    int _platformId;
    
    UIScrollView *myScrollView;
    
}

@property (assign) id<ThirdPartViewControllerDelegate> delegate; 

@property (nonatomic,retain) IBOutlet  UIScrollView *myScrollView;

@property(nonatomic,retain)IBOutlet UITextField *emailTextField;
@property(nonatomic,retain)IBOutlet UITextField *keyTextField;

@property(nonatomic,retain) IBOutlet UITextField *nicknameTextField;

@property(nonatomic,retain)  NSDictionary *userInfo_dict;

@property (nonatomic)  int _platformId;

-(id)initWithUserInfo:(NSDictionary *)userInfoDict platformId:(int)platformId;

-(void)verifyEmail;

-(void)verifyNickname;

-(IBAction)derectLogin:(id)sender;
-(IBAction)bindLogin:(id)sender;

//keyboard
- (void) registerForKeyboardNotifications;
- (void) keyboardWasHidden:(NSNotification *) notif;
- (void) keyboardWasShown:(NSNotification *) notif;

@end



//Delegate
@protocol ThirdPartViewControllerDelegate <NSObject>
@optional 
-(void)createNewQQUser:(NSString *)nickName;
-(void)verifyToken;
-(void)bindQQUser:(NSString *)email key:(NSString *)pass;
@end

